/**
 * 
 */
package com.lfd.controller;

import java.util.ArrayList;



import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.lfd.entity.CarProduct;
import com.lfd.service.AdminServer;
import com.lfd.service.ICarProductService;
import com.lfd.util.Result;
import com.lfd.util.UserUtil;
import com.lfd.vo.AdminVo;
import com.lfd.vo.CarProductVo;

/**
 * @author 2322
 *
 */
@Controller
@RequestMapping("/carproduct")
public class AdminController {

	private final Logger logger=Logger.getLogger(AdminController.class);
	@Autowired
	private AdminServer adminServer;
	private AdminVo select;
	@ResponseBody
	@RequestMapping("/woqu")
	public Result select(@RequestParam(value = "loginNam",required = false)String loginNam,@RequestParam(value = "password",required = false)String password) {
		AdminVo adminVo=new AdminVo();
		adminVo.setLoginNam(loginNam);
		adminVo.setPassword(password);
		
		
		    try {
				adminServer.select(adminVo);
			} catch (Exception e) {
				logger.error("失败", e);
				return new Result("1", "登录失败");
			}
		    return new Result("0", "登录成功");
	}
}